# @Time : 2023/1/9
# @Author : SDAJAVA

from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import headless_package

# chrome_options = Options()
# chrome_options.add_argument('--headless')
# chrome_options.add_argument('--disable-gpu')
#
# path = r'C:\Users\SDAJAVA\AppData\Local\Google\Chrome\Application\chrome.exe'
# chrome_options.binary_location = path
#
# browser = webdriver.Chrome(options=chrome_options)
#
url = 'https://www.baidu.com'
# browser.get(url)
# # 保存快照
# browser.save_screenshot("baidu.png")


browser = headless_package.share_browser()
browser.get(url)
# 保存快照
browser.save_screenshot("baidu.png")


